<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VOC MASTER</title>
<LINK href="/monitor/css/basic.css" rel="stylesheet" type="text/css">
<script src="/monitor/jquery-ui-1.10.1.custom/js/jquery-1.9.1.js" type="text/javascript" ></script>
<script src="/monitor/js/basic.js" type="text/javascript" ></script>
</head>
<body>
<c:if test="${!empty param.PARAM_ID_VOC}">
   <c:set var="where1" value="AND ID_VOC = '${param.PARAM_ID_VOC}'" />			
</c:if>
<c:if test="${!empty param.PARAM_DT_VOC_REG}">
   <c:set var="where2" value="AND DT_VOC_REG BETWEEN TO_DATE('${param.PARAM_DT_VOC_REG} 00:00','YYYY-MM-DD hh24:mi') AND TO_DATE('${param.PARAM_DT_VOC_REG} 23:59','YYYY-MM-DD hh24:mi')" />	
</c:if>
<c:if test="${!empty param.PARAM_ID_VOC_REG_EMP}">
   <c:set var="where3" value="AND ID_VOC_REG_EMP = '${param.PARAM_ID_VOC_REG_EMP}'" />			
</c:if>
<c:if test="${!empty param.PARAM_DS_TITLE}">
   <c:set var="where4" value="AND DS_TITLE LIKE '${param.PARAM_DS_TITLE}%'" />			
</c:if>
<sql:query var='test' dataSource="basisDataSource">
	SELECT * 
	 FROM TBS_VOC_MASTER
	WHERE 1 = 1
	  AND ROWNUM < 100
	 ${where1}
	 ${where2}
	 ${where3}
	 ${where4}
 </sql:query>	
<h3>VOC MASTER</h3>
 <form method="post">
	<table>
		<tr>
			<td>ID_VOC</td>
			<td><input name="PARAM_ID_VOC" value="${param.PARAM_ID_VOC}"></td>
			<td>DT_VOC_REG</td>
			<td><input name="PARAM_DT_VOC_REG" value="${param.PARAM_DT_VOC_REG}"></td>
		</tr>
		<tr>
			<td>ID_VOC_REG_EMP</td>
			<td><input name="PARAM_ID_VOC_REG_EMP" value="${param.PARAM_ID_VOC_REG_EMP}"></td>
			<td>DS_TITLE</td>
			<td><input name="PARAM_DS_TITLE" value="${param.PARAM_DS_TITLE}"></td>
		</tr>		
	</table>
	<input type="submit" />
</form>
<br/>
<h3>TBS_VOC_MASTER</h3>
<table border="1">
	<tr>
			<td class="header">ID_VOC</td>
			<td class="header">TP_CHNN_SYSTEM</td>
			<td class="header">TP_CHNN_PATH</td>
			<td class="header">TP_CHNN_METHOD</td>
			<td class="header">DT_VOC_REG</td>
			<td class="header">ID_VOC_REG_DEPT</td>
			<td class="header">ID_VOC_REG_EMP</td>
			<td class="header">DT_CUST_RECV</td>
			<td class="header">DT_VOC_RECV</td>
			<td class="header">ID_VOC_RECV_DEPT</td>
			<td class="header">ID_VOC_RECV_EMP</td>
			<td class="header">TP_CUST</td>
			<td class="header">ID_CUST</td>
			<td class="header">ID_TRAN_HIST</td>
			<td class="header">CD_COMP</td>
			<td class="header">CD_BRAND</td>
			<td class="header">DT_VOC_DIST</td>
			<td class="header">ID_VOC_DIST_DEPT</td>
			<td class="header">ID_VOC_DIST_EMP</td>
			<td class="header">DT_VOC_ASN</td>
			<td class="header">ID_VOC_ASN_DEPT</td>
			<td class="header">ID_VOC_ASN_EMP</td>
			<td class="header">DT_VOC_ACT_CFM</td>
			<td class="header">DT_VOC_ACT_PLAN</td>
			<td class="header">DT_VOC_ACT</td>
			<td class="header">ID_VOC_ACT_DEPT</td>
			<td class="header">ID_VOC_ACT_EMP</td>
			<td class="header">DT_VOC_END</td>
			<td class="header">DS_TITLE</td>
			<td class="header">CD_VOC_STATUS</td>
			<td class="header">FG_PROCESS_IMME</td>
			<td class="header">FG_VOC_EXCLUSION</td>
			<td class="header">FG_TMP</td>
			<td class="header">FG_VOC_MULTI</td>
			<td class="header">FG_DEL</td>
			<td class="header">DT_REG</td>
			<td class="header">ID_REG_DEPT</td>
			<td class="header">ID_REG_EMP</td>
			<td class="header">DT_UPT</td>
			<td class="header">ID_UPT_DEPT</td>
			<td class="header">ID_UPT_EMP</td>
			<td class="header">CD_SUB_BRAND</td>
		</tr>
	<tr>
			<td class="header">VOC번호</td>
			<td class="header">접수채널</td>
			<td class="header">접수경로</td>
			<td class="header">접수방법</td>
			<td class="header">등록일시</td>
			<td class="header">등록부서</td>
			<td class="header">등록자</td>
			<td class="header">고객접수일시</td>
			<td class="header">접수일시</td>
			<td class="header">접수부서</td>
			<td class="header">접수자</td>
			<td class="header">고객구분</td>
			<td class="header">고객번호</td>
			<td class="header">거래이력번호</td>
			<td class="header">회사코드</td>
			<td class="header">브랜드코드</td>
			<td class="header">배분확정일시</td>
			<td class="header">배분확정부서</td>
			<td class="header">배분확정자</td>
			<td class="header">배정일시</td>
			<td class="header">배정부서</td>
			<td class="header">배정자</td>
			<td class="header">처리확정일시</td>
			<td class="header">처리예정일시</td>
			<td class="header">처리일시</td>
			<td class="header">처리부서</td>
			<td class="header">처리자</td>
			<td class="header">종결일시</td>
			<td class="header">제목</td>
			<td class="header">진행상태</td>
			<td class="header">즉시처리여부</td>
			<td class="header">VOC제외여부</td>
			<td class="header">임시저장여부</td>
			<td class="header">복합VOC여부</td>
			<td class="header">삭제여부</td>
			<td class="header">최초등록일시</td>
			<td class="header">최초등록부서</td>
			<td class="header">최초등록자</td>
			<td class="header">최초수정일시</td>
			<td class="header">최초수정부서</td>
			<td class="header">최초수정자</td>
			<td class="header">SUB브랜드코드</td>
		</tr>
	<c:forEach var="row" items="${test.rows}">
	<tr onclick="setLineBGColor(this)">
			<td><a href="TBS_VOC_DIST.jsp?PARAM_ID_VOC=${row.ID_VOC}">${row.ID_VOC}</a></td>
			<td>${row.TP_CHNN_SYSTEM}</td>
			<td>${row.TP_CHNN_PATH}</td>
			<td>${row.TP_CHNN_METHOD}</td>
			<td>${row.DT_VOC_REG}</td>
			<td>${row.ID_VOC_REG_DEPT}</td>
			<td>${row.ID_VOC_REG_EMP}</td>
			<td>${row.DT_CUST_RECV}</td>
			<td>${row.DT_VOC_RECV}</td>
			<td>${row.ID_VOC_RECV_DEPT}</td>
			<td>${row.ID_VOC_RECV_EMP}</td>
			<td>${row.TP_CUST}</td>
			<td>${row.ID_CUST}</td>
			<td>${row.ID_TRAN_HIST}</td>
			<td>${row.CD_COMP}</td>
			<td>${row.CD_BRAND}</td>
			<td>${row.DT_VOC_DIST}</td>
			<td>${row.ID_VOC_DIST_DEPT}</td>
			<td>${row.ID_VOC_DIST_EMP}</td>
			<td>${row.DT_VOC_ASN}</td>
			<td>${row.ID_VOC_ASN_DEPT}</td>
			<td>${row.ID_VOC_ASN_EMP}</td>
			<td>${row.DT_VOC_ACT_CFM}</td>
			<td>${row.DT_VOC_ACT_PLAN}</td>
			<td>${row.DT_VOC_ACT}</td>
			<td>${row.ID_VOC_ACT_DEPT}</td>
			<td>${row.ID_VOC_ACT_EMP}</td>
			<td>${row.DT_VOC_END}</td>
			<td>${row.DS_TITLE}</td>
			<td>${row.CD_VOC_STATUS}</td>
			<td>${row.FG_PROCESS_IMME}</td>
			<td>${row.FG_VOC_EXCLUSION}</td>
			<td>${row.FG_TMP}</td>
			<td>${row.FG_VOC_MULTI}</td>
			<td>${row.FG_DEL}</td>
			<td>${row.DT_REG}</td>
			<td>${row.ID_REG_DEPT}</td>
			<td>${row.ID_REG_EMP}</td>
			<td>${row.DT_UPT}</td>
			<td>${row.ID_UPT_DEPT}</td>
			<td>${row.ID_UPT_EMP}</td>
			<td>${row.CD_SUB_BRAND}</td>
		</tr>
	</c:forEach>
</table>
</body>
</html> 